<template>
  <div id="app">
    <router-view />
    <theme-picker />
  </div>
</template>

<script>

/**
 * 约定:
 * 为了前后端统一,特作以下约定:
 * 1.路由中的路径参数统一驼峰命名.比如历史数据 /historyData
 * 2.变量名统一驼峰命名
 * 3.变量类型不作特殊处理,后端传String,前端就接收String,后端传int,前端就接收int
 */
import ThemePicker from "@/components/ThemePicker";

export default {
  name: "App",
  components: { ThemePicker },
  metaInfo() {
    return {
      title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
      titleTemplate: title => {
        return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
      }
    }
  }
};
</script>
<style scoped>
#app .theme-picker {
  display: none;
}
</style>
